package cloud.simple.log4j;

import org.apache.log4j.Logger;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping(value="/log")
public class LoggerController {
//	private Logger logger = Logger.getLogger(LoggerController.class);
	
	@RequestMapping(value="/sharelog",method=RequestMethod.POST)
	public String home(int num1) throws Exception{

		String rs = "";
		if(num1==1){
			rs =  "hello word!" + num1;
		}else{
			throw new Exception(); 
		}
		
		return rs;
	}
	
}
